# 创建一个类People,拥有的方法为砍柴,娶媳妇,回家;实例化对象,执行相应的方法
# 显示如下:
#     老李,18岁,男,开车去娶媳妇
#     校思浩,22岁,男,上山去砍柴
#     唐浩,10岁,女,辍学回家
# 提示:
#     属性:name,age,gender
#     方法:goHome(), kanChai(),quXiFu()

class Perple:
    name="高佳辉"
    age="22"
    sex="男"
    def __init__(self,name,age,sex):
        self.name=name
        self.age=age
        self.sex=sex
        print(self.name+","+self.age+"岁，"+self.sex+",",end="")
    def __del__(self):
        print("-"*15)
        print("%s,%s,%s,释放了" %(self.name,self.age,self.sex))


    def goHome(self):
        print("辍学回家")
    def kanChai(self):
        print("上山去砍柴")
    def quXiFu(self):
        print("开车去娶媳妇")

person1=Perple("老李","18","男")
person1.quXiFu()
person2 = Perple("校思浩"," 22", "男")
person2.kanChai()
person3 = Perple("唐浩", "10", "女")
person3.goHome()
person4=Perple(Perple.name,Perple.age,Perple.sex)
print(Perple.name)

